﻿<Grid  x:Name="RootGrid" Background="#00b2f0"
    x:Class="Antares.ExtendedSplash"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Antares"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid.Resources>
        <Storyboard x:Name="onAppear">
            <DoubleAnimation Storyboard.TargetName="extendedSplashBackground" 
                                 Storyboard.TargetProperty="Opacity" 
                                 To="1" BeginTime="0:0:1.8" Duration="0:0:1.3" />
            <DoubleAnimation x:Name="splashGridLeft" Storyboard.TargetName="splashGrid" 
                                 Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" 
                                 To="450" Duration="0:0:1.9" BeginTime="0:0:0">
                <DoubleAnimation.EasingFunction>
                    <ExponentialEase Exponent="5" />
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
            <DoubleAnimation Storyboard.TargetName="ProgressRing" Storyboard.TargetProperty="Opacity" To="1" 
                                 BeginTime="0:0:2" Duration="0:0:0.3" />
        </Storyboard>
        <Storyboard x:Name="blurring" Completed="blurring_Completed"  >
            <DoubleAnimation Storyboard.TargetName="blurredSplashBackground"  Storyboard.TargetProperty="Opacity" To="1"  Duration="0:0:0.3" />
            <DoubleAnimation Storyboard.TargetName="splashGrid"  Storyboard.TargetProperty="Opacity" To="0"  Duration="0:0:0.3" />
        </Storyboard>
    </Grid.Resources>


    <Grid x:Name="extendedSplashBackground" Opacity="0">
        <Grid.Background>
            <ImageBrush ImageSource="../Assets//Dulcet.jpg" Stretch="UniformToFill" AlignmentY="Top" AlignmentX="Left" />
        </Grid.Background>
    </Grid>
    <Grid x:Name="blurredSplashBackground" Opacity="0">
        <Grid.Background>
            <ImageBrush ImageSource="../Assets//BlurDulcet.jpg" Stretch="UniformToFill" AlignmentY="Top" AlignmentX="Left" />
        </Grid.Background>
    </Grid>

    <StackPanel x:Name="splashGrid" HorizontalAlignment="Center" VerticalAlignment="Center">
            <StackPanel.RenderTransform>
                <TranslateTransform X="0" />
            </StackPanel.RenderTransform>
            <Image x:Name="extendedSplashImage" Stretch="None" Source="Assets/newSplashScreen.png" />

            <ProgressRing x:Name="ProgressRing" Foreground="White" IsActive="True"
             MaxHeight="50" MinHeight="50" MaxWidth="80"
        MinWidth="30"  Width="58" Height="54" Opacity="0" Margin="0,-30,0,0" ></ProgressRing>
        </StackPanel>
    

</Grid>